<?php
namespace app\common\model\shop;

use app\common\model\shop\ozon\OzonBrandModel;
use think\admin\Model;

/**
 * Undocumented class
 * @package app\common\model\shop
 * @author xuli
 * @DateTime 2024-10-30 13:48
 */
class BrandModel extends Model
{

    protected $name = 'shop_brand_ozon';

    public static function instance($platform_id)
    {
        $model = null;
        $platform_info = PlatformModel::mk()->find($platform_id);
        if (empty($platform_info)) {
            return $model;
        }
        // 根据平台实例化相应模型
        switch ($platform_info['code']) {
            case 'ozon':
                $model = new OzonBrandModel();
                break;
        }
        return $model;
    }

}